Optimal. Leaf size=85 \[ \frac{a^{5/2} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{b^{5/2} f (a-b)}-\frac{(a+b) \tan (e+f x)}{b^2 f}-\frac{x}{a-b}+\frac{\tan ^3(e+f x)}{3 b f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.187996, antiderivative size = 85, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {3670, 479, 582, 522, 203, 205} \[ \frac{a^{5/2} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{b^{5/2} f (a-b)}-\frac{(a+b) \tan (e+f x)}{b^2 f}-\frac{x}{a-b}+\frac{\tan ^3(e+f x)}{3 b f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 479
Rule 582
Rule 522
Rule 203
Rule 205
Rubi steps
\begin{align*} \int \frac{\tan ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^6}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\tan ^3(e+f x)}{3 b f}-\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (3 a+3 (a+b) x^2\right )}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{3 b f}\\ &=-\frac{(a+b) \tan (e+f x)}{b^2 f}+\frac{\tan ^3(e+f x)}{3 b f}+\frac{\operatorname{Subst}\left (\int \frac{3 a (a+b)+3 \left (a^2+a b+b^2\right ) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{3 b^2 f}\\ &=-\frac{(a+b) \tan (e+f x)}{b^2 f}+\frac{\tan ^3(e+f x)}{3 b f}-\frac{\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b) f}+\frac{a^3 \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{(a-b) b^2 f}\\ &=-\frac{x}{a-b}+\frac{a^{5/2} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{(a-b) b^{5/2} f}-\frac{(a+b) \tan (e+f x)}{b^2 f}+\frac{\tan ^3(e+f x)}{3 b f}\\ \end{align*}
Mathematica [A] time = 0.781735, size = 92, normalized size = 1.08 \[ \frac{\sqrt{b} \left ((a-b) \tan (e+f x) \left (3 a-b \sec ^2(e+f x)+4 b\right )+3 b^2 (e+f x)\right )-3 a^{5/2} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{3 b^{5/2} f (b-a)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.017, size = 102, normalized size = 1.2 \begin{align*}{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3\,fb}}-{\frac{a\tan \left ( fx+e \right ) }{f{b}^{2}}}-{\frac{\tan \left ( fx+e \right ) }{fb}}+{\frac{{a}^{3}}{f{b}^{2} \left ( a-b \right ) }\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f \left ( a-b \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.21668, size = 618, normalized size = 7.27 \begin{align*} \left [-\frac{12 \, b^{2} f x - 4 \,{\left (a b - b^{2}\right )} \tan \left (f x + e\right )^{3} + 3 \, a^{2} \sqrt{-\frac{a}{b}} \log \left (\frac{b^{2} \tan \left (f x + e\right )^{4} - 6 \, a b \tan \left (f x + e\right )^{2} + a^{2} - 4 \,{\left (b^{2} \tan \left (f x + e\right )^{3} - a b \tan \left (f x + e\right )\right )} \sqrt{-\frac{a}{b}}}{b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}}\right ) + 12 \,{\left (a^{2} - b^{2}\right )} \tan \left (f x + e\right )}{12 \,{\left (a b^{2} - b^{3}\right )} f}, -\frac{6 \, b^{2} f x - 2 \,{\left (a b - b^{2}\right )} \tan \left (f x + e\right )^{3} - 3 \, a^{2} \sqrt{\frac{a}{b}} \arctan \left (\frac{{\left (b \tan \left (f x + e\right )^{2} - a\right )} \sqrt{\frac{a}{b}}}{2 \, a \tan \left (f x + e\right )}\right ) + 6 \,{\left (a^{2} - b^{2}\right )} \tan \left (f x + e\right )}{6 \,{\left (a b^{2} - b^{3}\right )} f}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 20.8982, size = 685, normalized size = 8.06 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 4.15437, size = 521, normalized size = 6.13 \begin{align*} \frac{\frac{3 \,{\left (a^{3} b^{4} + b^{7} + a^{2} b{\left | -a b^{3} + b^{4} \right |} + a b^{2}{\left | -a b^{3} + b^{4} \right |} + b^{3}{\left | -a b^{3} + b^{4} \right |}\right )}{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor + \arctan \left (\frac{8 \, \sqrt{\frac{1}{2}} \tan \left (f x + e\right )}{\sqrt{\frac{16 \, a b^{3} + 16 \, b^{4} + \sqrt{-1024 \, a b^{7} + 256 \,{\left (a b^{3} + b^{4}\right )}^{2}}}{b^{4}}}}\right )\right )}}{a b^{3}{\left | -a b^{3} + b^{4} \right |} + b^{4}{\left | -a b^{3} + b^{4} \right |} +{\left (a b^{3} - b^{4}\right )}^{2}} - \frac{3 \,{\left ({\left (a^{2} + a b + b^{2}\right )} \sqrt{a b}{\left | -a b^{3} + b^{4} \right |}{\left | b \right |} -{\left (a^{3} b^{3} + b^{6}\right )} \sqrt{a b}{\left | b \right |}\right )}{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor + \arctan \left (\frac{8 \, \sqrt{\frac{1}{2}} \tan \left (f x + e\right )}{\sqrt{\frac{16 \, a b^{3} + 16 \, b^{4} - \sqrt{-1024 \, a b^{7} + 256 \,{\left (a b^{3} + b^{4}\right )}^{2}}}{b^{4}}}}\right )\right )}}{{\left (a b^{3} - b^{4}\right )}^{2} b -{\left (a b^{4} + b^{5}\right )}{\left | -a b^{3} + b^{4} \right |}} + \frac{b^{2} \tan \left (f x + e\right )^{3} - 3 \, a b \tan \left (f x + e\right ) - 3 \, b^{2} \tan \left (f x + e\right )}{b^{3}}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]